<div class="row-content am-cf">
	<div class="row">
		<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
			<div class="widget am-cf">
				<div class="widget-head am-cf">
					<div class="widget-title am-fl">新增定时任务</div>
					<div class="widget-function am-fr">
						<a href="javascript:;" class="am-icon-cog"></a>
					</div>
				</div>
				<div class="widget-body am-fr">
					<form class="am-form tpl-form-line-form" id="dataForm" method="post">
						<div class="am-form-group">
							<label for="jobName" class="am-u-sm-2 am-form-label">任务名称</label>
							<div class="am-u-sm-10">
								<input type="text" id="jobName" class="tpl-form-input" placeholder="请输入任务名称" name="jobName" /> 
							</div>
						</div>
						<div class="am-form-group">
							<label for="jobGroup" class="am-u-sm-2 am-form-label">任务分组</label>
							<div class="am-u-sm-10">
								<input type="text" id="jobGroup" class="tpl-form-input" placeholder="请输入任务分组" name="jobGroup" /> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="cron" class="am-u-sm-2 am-form-label">cron表达式</label>
							<div class="am-u-sm-10">
								<input type="text" id="cron" class="tpl-form-input" placeholder="请输入cron表达式" name="cron" /> 
							</div>
						</div>
						
						<div class="am-form-group">
							<label for="beanClass" class="am-u-sm-2 am-form-label">执行Bean</label>
							<div class="am-u-sm-10">
								<input type="text" id="beanName" class="tpl-form-input" placeholder="请输入执行Bean" name="beanName" /> 
							</div>
						</div>
					 <div class="am-form-group">
							<label for="methodName" class="am-u-sm-2 am-form-label">调度方法名</label>
							<div class="am-u-sm-10">
								<input type="text" id="methodName" class="tpl-form-input"  name="methodName" value="run" /> 
							</div>
						</div>
					  <div class="am-form-group">
                            <label for="remarks" class="am-u-sm-2 am-form-label">描述</label>
                            <div class="am-u-sm-10 am-margin-top-xs">
                                <textarea class="" rows="10" id="remarks" name="remarks" placeholder="请输入描述"></textarea>
                            </div>
                        </div>
                         <div class="am-form-group">
                          <label for="isConcurrent" class="am-u-sm-2 am-form-label">是否并发</label>
                          <div class="am-u-sm-10">
                              <div class="tpl-switch">
                                  <input type="checkbox" class="ios-switch bigswitch tpl-switch-btn am-margin-top-xs"  name="isConcurrent"/>
                                  <div class="tpl-switch-btn-view">
                                      <div>
                                      </div>
                                  </div>
                              </div>

                          </div>
                      </div>
						<div class="am-form-group">
							<div class="am-u-sm-10 am-u-sm-push-2">
								
								<button type="button" onclick="javascript:$('#dataForm').submit();"
									class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
										<button type="button" onclick="loadPage('schedule/listUI')"
									class="am-btn am-btn-success tpl-btn-bg-color-success ">返回</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	</div>
	<script th:inline="javascript">
	<![CDATA[
		validateUserForm();
		function validateUserForm(){ 
			$('#dataForm').validate({
		        errorElement : 'span',
		        errorClass : 'am-icon-times',
		        focusInvalid : true,
		        onkeyup:false,
		        ignore : "",
		        rules : {
		        	jobName : {
		                required : true
		            },
		            jobGroup : {
		                required : true
		            },
		            cron : {
		                required : true
		            },
		            beanName: {
		                required : true
		            },
		            methodName:{
		            	required : true
		            }
		        },
		        messages : {
		        	jobName : {
		                required : "请填写任务名称"
		            },
		            jobGroup : {
		                required : "请填写任务分组"
		            },
		            cron : {
		                required : "请输入Cron表达式"
		            },
		            beanName: {
		                required : "请输入Bean名称"
		            },
		            methodName:{
		            	required : "请输入方法名"
		            }
		        },
		        submitHandler : function(form) {
		        	commit('dataForm', 'schedule/save', 'schedule/listUI');
		        }
		    });
		}
		
		]]>
	</script>